<?php
/**
 * Author Yulin
 * Email  dwzhanglong@126.com
 * Date   2017-7-21
 * Func   个人信息
 */
defined('IN_YuLin') || exit('NO PERMIT!');
$seo['title'] = '大众彩票-安全中心';
$pageTitle    = '安全中心';
$navTag       = 'member';
$page         = 'member/security';

UserLogin();
$userInfo     = $_user;
// 检查安全设置项，方便前台星级评分
$defaultSafeLv = 1;
if ($userInfo['safepwd']) $defaultSafeLv++;
if ($userInfo['safe_question']) $defaultSafeLv++;

$ip          = GetIp();
//$url         = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json";//新浪借口获取访问者地区
//$visitArea   = json_decode(file_get_contents($url),true);
$url="http://ip.taobao.com/service/getIpInfo.php?ip=".$ip;
$ipinfo=json_decode(file_get_contents($url));
if($ipinfo->code=='1'){
    $country = '';
    $province = '';
    $city = '';
}
$country = $ipinfo->data->country;
$province = $ipinfo->data->region;
$city = $ipinfo->data->city;

$visitArea = array('country'=> $country,'province'=>$province , 'city'=> $city);

$tpl->display($page);



